#ifndef HARDINTERFACE_H
#define HARDINTERFACE_H

#include "sendreceivecontroll.h"
#include "gpskoordinaten.h"


class HardInterface: public QObject
{
    Q_OBJECT

private:
    //sendReceiveControll *commCtl;
    QTimer *timer;
    int count;
    QHostAddress simIP;

    int panneButton;
    int carId;



public:
    sendReceiveControll *commCtl;
    int geschwSoll;
    int spurSoll;

    HardInterface(int geschwSoll, int spurSoll);
    ~HardInterface();

    bool initHardware();

signals:
    void initReady(int id, int spur, int weite);
    void startKommunikation();
    void aktualisiereCarData(QByteArray carDat, QList<QByteArray> listDaten);
    //void aktualisiereCarsList(QList<QByteArray> listDaten);

public slots:
    void initOK(QHostAddress senderIP, quint16 senderPort,QByteArray data);
    void tryToInit();
    void simDataReceived(QHostAddress senderIP, quint16 senderPort,QByteArray data);
    void sendDataToSim(QByteArray carData);
};

#endif // HARDINTERFACE_H
